{extend name="common/base" /}

{block name="style"}
{/block}
{block name="body"}
<div class="yjfk-mains">
    <form method="post" id="opinion-form" enctype="multipart/form-data" action=""> 
        <textarea class="yjfk-text js-content" name="content" placeholder="您的反馈是我们前进的动力"></textarea>
        <div class="yjfk-button">提交反馈</div>
    </form>
    <a href="{:url('opinionList')}"><p class="yjfk-ps">我的反馈记录</p></a>

</div>
{/block}
{block name="script"}
<script>
    $('.yjfk-button').on('click', function () {
        var flag = 1;
        var err = '';

        if (!$(".js-content").val()) {
            err = '请填写反馈意见';
            flag = 0;
        }

        if (flag) {
            $("#opinion-form").submit();
        } else {
            mui.alert(err);
        }
    });
</script>
{/block}